// babel-preset-taro 更多选项和默认值：
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
const injectPageDecoratorPlugin = require('./plugins/injectPageDecoratorPlugin');

module.exports = {
  presets: [
    [
      'taro',
      {
        framework: 'react',
        ts: <%= typescript %>,
      },
    ],
  ],
  plugins: [
    injectPageDecoratorPlugin,
    '@babel/plugin-proposal-nullish-coalescing-operator',
    '@babel/plugin-proposal-optional-chaining',
    [
      'import',
      {
        libraryName: '@bingo/ammo',
        libraryDirectory: 'es',
        style: true,
        camel2DashComponentName: false,
      },
    ],
  ],
};
